<?php
class Zendhlt_View_Helper_CmsButton extends Zend_View_Helper_Abstract{
	
	public function cmsButton($name, $link = '#', $imgLink, $type = 'link', $kindbtn = null) {
		
		if ($kindbtn != 'multidelete') {
			if ($type == 'link') {
				$aTag = 'href="' . $link . '" ';
			} else {
				$aTag = 'href="#" onclick="OnSubmitForm(\'' . $link . '\')"';
			}
			
			$xhtml = '<div class="toolbar-button" >
	                        <a ' . $aTag . '>
	        				<img src="' . $imgLink . '">  
	                        <br>
	                       ' . $name . '
	                        </a>
	                    </div>';
		} else {
			if ($type == 'link') {
				$aTag = 'href="' . $link . '" ';
			} else {
				$aTag = 'href="#" onclick="confirmDialogDelMulti(this, \'' . $link . '\')"';
			}
			
			$xhtml = '<div class="toolbar-button" >
	                        <a class="confirm-dialog" ' . $aTag . '>
	        				<img src="' . $imgLink . '">  
	                        <br>
	                       ' . $name . '
	                        </a>
	                    </div>';
		}
		return $xhtml;
	}
}